 function chk(){
     if(document.frm1.catnm.value==""){
	  alert("Please enter category name");
	   document.frm1.catnm.focus();
	    return false;
	  }

  
   if(document.frm1.catnm.value>30){
	  alert("Please enter category less than 20 character");
	   document.frm1.catnm.focus();
	    return false;
	  }

       var iChars = "!@#$%^*()+=-[]\\\';,./{}|\":<>?";
        for (var i = 0; i < document.frm1.catnm.value.length; i++) {
                if (iChars.indexOf(document.frm1.catnm.value.charAt(i)) != -1) {
                    alert ("The box has special characters. \nThese are not allowed.\n");
				    document.frm1.catnm.focus();
                  return false;
                   }
               }

      return true;
   } 
